<?php

namespace app\model;

class AdminUser extends BaseModel
{
    public function check_pwd($pwd): bool
    {
        return $this->encryption_pwd($this->salt, $pwd) == $this->password;
    }

    public function encryption_pwd($salt, $pwd): string
    {
        return md5(md5($salt) . md5($pwd));
    }
}